/**
 * @author zhu
 * @date 2024-04-01
 */
public class MainTest {
    public static void main(String[] args) {
        Dog xb = new Dog("小白");
        Cat xh = new Cat("小花");
        Tiger xw = new Tiger("小文");


        // 实例化主人对象 - 带什么宠物？ - 通过泛型指定具体的数据类型
        People<Dog> zs = new People<>();
        zs.setPet(xb);

        People<Cat> ls = new People<>();
        ls.setPet(xh);

        // People<Tiger> zbw = new People<>();
        // zbw.setPet(xw);

        zs.shopping();
        ls.shopping();
        // zbw.shopping();
    }
}
